home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10575 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 6e 65 77 73 2e 65 6e 67 | 2e 63 6f 6e 76 65 78 2e |news.eng|.convex.|
|00000030| 63 6f 6d 21 61 72 63 6f | 21 75 73 65 6e 65 74 0a |com!arco|!usenet.|
|00000040| 46 72 6f 6d 3a 20 42 72 | 69 61 6e 20 4c 65 61 63 |From: Br|ian Leac|
|00000050| 68 20 3c 6c 61 73 62 66 | 6c 3e 0a 53 75 62 6a 65 |h <lasbf|l>.Subje|
|00000060| 63 74 3a 20 52 65 3a 20 | 51 3a 20 53 74 72 69 6e |ct: Re: |Q: Strin|
|00000070| 67 20 72 65 70 6c 61 63 | 65 6d 65 6e 74 0a 58 2d |g replac|ement.X-|
|00000080| 4e 6e 74 70 2d 50 6f 73 | 74 69 6e 67 2d 48 6f 73 |Nntp-Pos|ting-Hos|
|00000090| 74 3a 20 31 33 36 2e 32 | 32 36 2e 31 31 36 2e 31 |t: 136.2|26.116.1|
|000000a0| 0a 43 6f 6e 74 65 6e 74 | 2d 54 79 70 65 3a 20 74 |.Content|-Type: t|
|000000b0| 65 78 74 2f 70 6c 61 69 | 6e 3b 20 63 68 61 72 73 |ext/plai|n; chars|
|000000c0| 65 74 3d 75 73 2d 61 73 | 63 69 69 0a 4d 65 73 73 |et=us-as|cii.Mess|
|000000d0| 61 67 65 2d 49 44 3a 20 | 3c 44 6e 79 6f 34 6f 2e |age-ID: |<Dnyo4o.|
|000000e0| 33 77 44 40 6e 65 77 73 | 2e 61 72 63 6f 2e 63 6f |3wD@news|.arco.co|
|000000f0| 6d 3e 0a 54 6f 3a 20 63 | 62 62 40 63 6f 6e 76 65 |m>.To: c|bb@conve|
|00000100| 78 2e 70 68 61 7a 63 2e | 75 6e 69 2d 68 65 69 64 |x.phazc.|uni-heid|
|00000110| 65 6c 62 65 72 67 2e 64 | 65 0a 53 65 6e 64 65 72 |elberg.d|e.Sender|
|00000120| 3a 20 75 73 65 6e 65 74 | 40 6e 65 77 73 2e 61 72 |: usenet|@news.ar|
|00000130| 63 6f 2e 63 6f 6d 0a 43 | 6f 6e 74 65 6e 74 2d 54 |co.com.C|ontent-T|
|00000140| 72 61 6e 73 66 65 72 2d | 45 6e 63 6f 64 69 6e 67 |ransfer-|Encoding|
|00000150| 3a 20 37 62 69 74 0a 4f | 72 67 61 6e 69 7a 61 74 |: 7bit.O|rganizat|
|00000160| 69 6f 6e 3a 20 41 52 43 | 4f 20 4f 69 6c 20 25 20 |ion: ARC|O Oil % |
|00000170| 47 61 73 20 43 6f 6d 70 | 61 6e 79 0a 52 65 66 65 |Gas Comp|any.Refe|
|00000180| 72 65 6e 63 65 73 3a 20 | 3c 34 68 65 63 6b 31 24 |rences: |<4heck1$|
|00000190| 64 71 70 40 73 75 6e 30 | 2e 75 72 7a 2e 75 6e 69 |dqp@sun0|.urz.uni|
|000001a0| 2d 68 65 69 64 65 6c 62 | 65 72 67 2e 64 65 3e 0a |-heidelb|erg.de>.|
|000001b0| 4d 69 6d 65 2d 56 65 72 | 73 69 6f 6e 3a 20 31 2e |Mime-Ver|sion: 1.|
|000001c0| 30 0a 44 61 74 65 3a 20 | 46 72 69 2c 20 38 20 4d |0.Date: |Fri, 8 M|
|000001d0| 61 72 20 31 39 39 36 20 | 31 38 3a 31 37 3a 31 32 |ar 1996 |18:17:12|
|000001e0| 20 47 4d 54 0a 58 2d 4d | 61 69 6c 65 72 3a 20 4d | GMT.X-M|ailer: M|
|000001f0| 6f 7a 69 6c 6c 61 20 31 | 2e 31 32 20 28 58 31 31 |ozilla 1|.12 (X11|
|00000200| 3b 20 49 3b 20 48 50 2d | 55 58 20 41 2e 30 39 2e |; I; HP-|UX A.09.|
|00000210| 30 35 20 39 30 30 30 2f | 37 35 35 29 0a 58 2d 55 |05 9000/|755).X-U|
|00000220| 72 6c 3a 20 6e 65 77 73 | 3a 34 68 65 63 6b 31 24 |rl: news|:4heck1$|
|00000230| 64 71 70 40 73 75 6e 30 | 2e 75 72 7a 2e 75 6e 69 |dqp@sun0|.urz.uni|
|00000240| 2d 68 65 69 64 65 6c 62 | 65 72 67 2e 64 65 0a 0a |-heidelb|erg.de..|
|00000250| 63 62 62 40 63 6f 6e 76 | 65 78 2e 70 68 61 7a 63 |cbb@conv|ex.phazc|
|00000260| 2e 75 6e 69 2d 68 65 69 | 64 65 6c 62 65 72 67 2e |.uni-hei|delberg.|
|00000270| 64 65 20 28 43 68 72 69 | 73 74 6f 70 68 65 72 20 |de (Chri|stopher |
|00000280| 42 6c 65 6e 63 6f 77 65 | 29 20 77 72 6f 74 65 3a |Blencowe|) wrote:|
|00000290| 0a 3e 49 20 68 61 76 20 | 61 20 43 20 70 72 6f 67 |.>I hav |a C prog|
|000002a0| 72 61 6d 2c 20 77 69 74 | 68 20 74 68 65 20 66 6f |ram, wit|h the fo|
|000002b0| 6c 6c 6f 77 69 6e 67 20 | 63 6f 6e 73 74 72 75 63 |llowing |construc|
|000002c0| 74 2c 20 74 6f 20 72 65 | 70 6c 61 63 65 0a 3e 61 |t, to re|place.>a|
|000002d0| 20 63 68 61 72 61 63 74 | 65 72 20 6f 66 20 61 20 | charact|er of a |
|000002e0| 67 69 76 65 6e 20 73 74 | 72 69 6e 67 3a 0a 3e 54 |given st|ring:.>T|
|000002f0| 68 65 20 74 73 72 69 6e | 67 20 69 73 0a 3e 73 74 |he tsrin|g is.>st|
|00000300| 61 74 69 63 20 63 68 61 | 72 20 2a 6c 69 6e 65 20 |atic cha|r *line |
|00000310| 3d 20 22 2f 64 65 76 2f | 70 74 79 58 58 22 3b 0a |= "/dev/|ptyXX";.|
|00000320| 3e 0a 3e 54 68 65 20 72 | 65 70 6c 61 63 65 6d 65 |>.>The r|eplaceme|
|00000330| 6e 74 20 73 68 6f 75 6c | 64 20 62 65 0a 3e 6c 69 |nt shoul|d be.>li|
|00000340| 6e 65 5b 38 5d 20 3d 20 | 64 70 2d 3e 64 5f 6e 61 |ne[8] = |dp->d_na|
|00000350| 6d 65 5b 33 5d 3b 0a 3e | 6c 69 6e 65 5b 39 5d 20 |me[3];.>|line[9] |
|00000360| 3d 20 64 70 2d 3e 64 5f | 6e 61 6d 65 5b 34 5d 3a |= dp->d_|name[4]:|
|00000370| 0a 3e 0a 3e 73 6f 2c 20 | 72 65 70 6c 61 63 65 20 |.>.>so, |replace |
|00000380| 58 58 20 77 69 74 68 20 | 74 77 6f 20 6f 74 68 65 |XX with |two othe|
|00000390| 72 20 63 68 61 72 73 2c | 0a 3e 0a 3e 4d 79 20 63 |r chars,|.>.>My c|
|000003a0| 63 20 28 43 6f 6e 76 65 | 78 20 4f 53 20 31 30 2e |c (Conve|x OS 10.|
|000003b0| 31 29 20 64 6f 65 73 20 | 6e 6f 74 20 68 61 6e 64 |1) does |not hand|
|000003c0| 6c 65 20 74 68 69 73 2c | 20 73 6f 20 69 73 20 74 |le this,| so is t|
|000003d0| 68 65 72 65 0a 3e 61 20 | 73 74 72 69 6e 67 20 66 |here.>a |string f|
|000003e0| 75 6e 63 74 69 6f 6e 20 | 74 6f 20 63 6f 6d 65 20 |unction |to come |
|000003f0| 61 6c 6f 6e 67 20 74 68 | 65 20 73 61 6d 65 20 3f |along th|e same ?|
|00000400| 0a 3e 0a 3e 49 20 61 6d | 20 6e 6f 20 67 6f 6f 64 |.>.>I am| no good|
|00000410| 20 43 20 70 72 6f 67 72 | 61 6d 6d 65 72 2c 20 73 | C progr|ammer, s|
|00000420| 6f 20 70 6c 65 61 73 65 | 20 66 6f 6c 6c 6f 77 20 |o please| follow |
|00000430| 75 70 20 6f 72 20 67 75 | 69 64 65 20 6d 65 0a 3e |up or gu|ide me.>|
|00000440| 74 6f 20 74 68 65 20 72 | 69 67 68 74 20 6c 69 62 |to the r|ight lib|
|00000450| 2c 20 69 66 20 61 6e 79 | 2e 0a 3e 0a 3e 43 68 72 |, if any|..>.>Chr|
|00000460| 69 73 74 6f 70 68 65 72 | 0a 0a 43 68 72 69 73 74 |istopher|..Christ|
|00000470| 6f 70 68 65 72 2c 0a 0a | 59 6f 75 72 20 63 6f 6d |opher,..|Your com|
|00000480| 70 69 6c 65 72 20 6d 61 | 79 20 62 65 20 70 75 74 |piler ma|y be put|
|00000490| 74 69 6e 67 20 79 6f 75 | 72 20 74 65 73 74 20 6c |ting you|r test l|
|000004a0| 69 6e 65 20 69 6e 20 61 | 20 6e 6f 6e 2d 6d 6f 64 |ine in a| non-mod|
|000004b0| 69 66 69 61 62 6c 65 20 | 70 72 6f 67 72 61 6d 0a |ifiable |program.|
|000004c0| 73 65 67 6d 65 6e 74 2e | 20 59 6f 75 20 6d 69 67 |segment.| You mig|
|000004d0| 68 74 20 74 72 79 20 61 | 6c 74 65 72 69 6e 67 20 |ht try a|ltering |
|000004e0| 79 6f 75 72 20 70 72 6f | 67 72 61 6d 20 62 79 20 |your pro|gram by |
|000004f0| 6d 6f 76 69 6e 67 20 74 | 68 65 20 73 74 72 69 6e |moving t|he strin|
|00000500| 67 20 74 6f 0a 74 68 65 | 20 68 65 61 70 3a 0a 0a |g to.the| heap:..|
|00000510| 73 74 61 74 69 63 20 63 | 68 61 72 20 2a 6c 69 6e |static c|har *lin|
|00000520| 65 3b 0a 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 74 |e;.const| char *t|
|00000530| 68 65 5f 6c 69 6e 65 20 | 3d 20 22 2f 64 65 76 2f |he_line |= "/dev/|
|00000540| 70 74 79 58 58 22 3b 0a | 6c 69 6e 65 20 3d 20 6e |ptyXX";.|line = n|
|00000550| 65 77 20 63 68 61 72 5b | 73 74 72 6c 65 6e 28 74 |ew char[|strlen(t|
|00000560| 68 65 5f 6c 69 6e 65 29 | 2b 31 5d 3b 0a 73 74 72 |he_line)|+1];.str|
|00000570| 63 70 79 28 6c 69 6e 65 | 2c 74 68 65 5f 6c 69 6e |cpy(line|,the_lin|
|00000580| 65 29 3b 0a 20 2a 2a 2a | 20 72 65 73 74 20 6f 66 |e);. ***| rest of|
|00000590| 20 79 6f 75 72 20 63 6f | 64 65 20 61 73 20 62 65 | your co|de as be|
|000005a0| 66 6f 72 65 20 2a 2a 2a | 0a 0a 49 66 20 79 6f 75 |fore ***|..If you|
|000005b0| 20 61 72 65 20 75 73 69 | 6e 67 20 61 20 63 20 63 | are usi|ng a c c|
|000005c0| 6f 6d 70 69 6c 65 72 2c | 20 79 6f 75 20 77 69 6c |ompiler,| you wil|
|000005d0| 6c 20 6e 65 65 64 20 74 | 6f 20 75 73 65 20 6d 61 |l need t|o use ma|
|000005e0| 6c 6c 6f 63 20 72 61 74 | 68 65 72 20 74 68 61 6e |lloc rat|her than|
|000005f0| 20 6e 65 77 2e 0a 49 66 | 20 74 68 69 73 20 69 73 | new..If| this is|
|00000600| 20 74 72 75 65 2c 20 79 | 6f 75 72 20 71 75 65 73 | true, y|our ques|
|00000610| 74 69 6f 6e 73 20 6d 69 | 67 68 74 20 62 65 20 62 |tions mi|ght be b|
|00000620| 65 74 74 65 72 20 61 64 | 64 72 65 73 73 65 64 20 |etter ad|dressed |
|00000630| 69 6e 20 63 6f 6d 70 2e | 6c 61 6e 67 2e 63 0a 72 |in comp.|lang.c.r|
|00000640| 61 74 68 65 72 20 74 68 | 61 6e 20 63 6f 6d 70 2e |ather th|an comp.|
|00000650| 6c 61 6e 67 2e 63 2b 2b | 2e 0a 0a 2d 42 72 69 61 |lang.c++|...-Bria|
|00000660| 6e 20 3a 2d 29 0a 0a 2d | 2d 20 0a 42 72 69 61 6e |n :-)..-|- .Brian|
|00000670| 20 46 2e 20 4c 65 61 63 | 68 0a 53 72 2e 20 53 79 | F. Leac|h.Sr. Sy|
|00000680| 73 74 65 6d 73 20 41 6e | 61 6c 79 73 74 0a 6c 61 |stems An|alyst.la|
|00000690| 73 62 66 6c 40 61 61 69 | 2e 61 72 63 6f 2e 63 6f |sbfl@aai|.arco.co|
|000006a0| 6d 0a 0a 54 65 6c 65 70 | 68 6f 6e 65 3a 09 28 39 |m..Telep|hone:.(9|
|000006b0| 30 37 29 20 32 36 33 2d | 34 38 36 30 0a 46 41 58 |07) 263-|4860.FAX|
|000006c0| 3a 09 09 28 39 30 37 29 | 20 32 36 35 2d 36 32 39 |:..(907)| 265-629|
|000006d0| 38 0a 0a 41 52 43 4f 20 | 41 6c 61 73 6b 61 2c 20 |8..ARCO |Alaska, |
|000006e0| 49 6e 63 2e 0a 41 54 4f | 2d 31 36 35 36 0a 50 2e |Inc..ATO|-1656.P.|
|000006f0| 4f 2e 20 42 6f 78 20 31 | 30 30 33 36 30 0a 41 6e |O. Box 1|00360.An|
|00000700| 63 68 6f 72 61 67 65 2c | 20 41 4b 20 39 39 35 31 |chorage,| AK 9951|
|00000710| 30 2d 30 33 36 30 0a 0a | |0-0360..| |
+--------+-------------------------+-------------------------+--------+--------+